﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace Ors.RInterface.Engine.PInvoke
{
    /*
    #ifdef Win32
typedef int (*blah1) (const char *, char *, int, int);
typedef void (*blah2) (const char *, int);
typedef void (*blah3) (void);
typedef void (*blah4) (const char *);
 Return value here is expected to be 1 for Yes, -1 for No and 0 for Cancel:
   symbolic constants in graphapp.h 
typedef int (*blah5) (const char *);
typedef void (*blah6) (int);
typedef void (*blah7) (const char *, int, int);

#endif*/
    public static class FunctionPointers
    {
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate int Blah1( string p1
                                  , IntPtr p2
                                   , UInt32 i1
                                   , UInt32 i2
                                   );
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate void Blah2([MarshalAs(UnmanagedType.LPStr)] string p1
                                   , UInt32 i1
                                   );
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate void Blah3();
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate void Blah4([MarshalAs(UnmanagedType.LPStr)] string p1
                                   );
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate int Blah5([MarshalAs(UnmanagedType.LPStr)] string p1
                                   );
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate void Blah6(UInt32 i1
                                   );

        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate void Blah7([MarshalAs(UnmanagedType.LPStr)] string p1
                                  , [MarshalAs(UnmanagedType.LPStr)] string p2
                                   , UInt32 i1
                                   , UInt32 i2
                                   );
    }
}
